home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.740 < prev    next >
Text File  |  1992-02-06  |  957b  |  30 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f2\fswiss Helvetica;}
  2. \paperw11440
  3. \paperh8340
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 point base view conversion\
  7.     \
  8.  
  9. \fi-420\li420 Q:  I would like to convert a point returned in an NXEvent from its base coordinates to a view coordinate system.  There are several routines to convert coordinates between views and between the screen and base coordinate systems, but I have not found one to convert a base coordinate to a view's coordinate system.  How do I do this?\
  10.  
  11. \i\fi0\li0     \
  12.  
  13. \i0\fi-420\li420 A:  Calling the following method with 
  14. \f1\fs24 aView == nil
  15. \f0\fs28  will convert the point from the base coordinate system of the window to the view's coordinate system:\
  16.  
  17. \fi0\li0 \
  18. \
  19.  
  20. \f1\fs24\fi540 - convertPoint:(NXPoint *)aPoint  fromView:aView; \
  21.  
  22. \f0\fs28\fi0 \
  23. \
  24. QA740\
  25. \
  26. Valid for 1.0\
  27. Valid for 2.0                \
  28. \
  29.  
  30.